#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2021/7/26 17:06
# @Author  : ldh
from basic.UIParent import UIParent
from test.cases.agx.AGXLogin import AGXLogin
from commen.page.agx.AGXSearchPage import AGXSearchPage
from commen.page.agx.AGXIndexPage import AGXIndexPage
from time import sleep


class AGXSearch(UIParent):

    @classmethod
    def test_agxSearch(cls):
        '''首页搜索'''
        #判断是否已登录
        AGXLogin.test_agxLoginByPwd()
        #打开首页-搜索进行操作
        AGXIndexPage.openHomePage()
        AGXSearchPage.openSearch()
        AGXSearchPage.moveOut()
        AGXSearchPage.imputSearch("乘车码")
        sleep(3)
        # AGXSearchPage.searchHotApp()
        if AGXSearchPage.ifEmpty()==True:
            print("搜索结果为空！")
        else:
            print("搜索结果不为空！")
            AGXSearchPage.SearchDetail()
            sleep(3)




